﻿namespace EasyGo.Data
{
    using System.Data.Entity;
    using EasyGo.Data.Mapping;
    using EasyGo.Domain.Model;

    public class EasyGoDbContext : DbContext
    {
        static EasyGoDbContext()
        {
            Database.SetInitializer<EasyGoDbContext>(null);
        }

        public IDbSet<Company> Companies { get; set; }

        public EasyGoDbContext()
            : base("Name=data")
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CompanyMap());
        }
    }
}
